package com.cdream.basic.algorithm.leetcode.dfs;

import java.util.ArrayList;
import java.util.List;

/**
 * @author cdream
 * @date 6/21/21
 */
public class Question401 {
    private List<String> res = new ArrayList<>();

    public List<String> readBinaryWatch(int turnedOn) {
        for (int i = 0; i < 1024; i++) {
            int h = i >> 6;
            int m = 63 & i;
            if (h<12 && m<60 && Integer.bitCount(i)==turnedOn){
                res.add(h + ":" + (m < 10 ? "0" : "") + m);
            }
        }
        return res;
    }


}
